clear all
rgb = imread('android_rgb.bmp');
gray = rgb2gray(rgb);

fp = fopen('gray_640x480.txt','w');

for V = 1:480
    for H = 1:640
        fprintf(fp,'%x\n',gray(V,H));
    end
end

fclose(fp);
